WNS

Section: User Commands (1)
Index Return to Main Contents
 

NAME

wns - windowing search  

SYNOPSIS

wns [-a nnn] [-b nnn] [-l nnn] [-w nnn] pattern [file ... ]  

DESCRIPTION

wns searches through a file or list of files for occurances of a particular pattern, and prints a window of lines around each match point.

Options which may be given are as follows:

-a nnn
(After) specifies that nnn lines following the matching line will be printed. default is 0.
-b nnn
(Before) specifies that nnn lines preceding the matching line will be printed. default is 0.
-d
Enables debugging information. Not a very interesting option.
-f
Suppress printing of the filename on each output line.
-l nnn
Sets the maximum line length to nnn. Lines longer than this will be truncated to this length before attempting to match them to the pattern as well as when printing them. Default is 100.
-n
Suppress printing of the line number on each output line.
-w nnn
Sets the window size to nnn. This is the same as -a nnn -b nnn.

wns outputs lines in the following format:

filename @nnnnn: text

where filename is the name of the file containing the matching text and may be suppressed with the -f option, lnnnn is the line number of the displayed line and may be suppressed with the -n option, and text is the line from the file. Additionally, if the total window size is greater than 1 (that is, more than zero lines before or after), then non-adjacent text areas are separated by a short dashed line.  

FILES

/usr/local/bin/wns /usr/local/src/wns/*  

CREDITS TO

M. Mallett (mem@zinn.MV.COM)  

BUGS

You tell me..


 

Index

NAME
SYNOPSIS
DESCRIPTION
FILES
CREDITS TO
BUGS

This document was created by man2html, using the manual pages.
Time: 21:59:47 GMT, August 02, 2022